//
//  AliPasswordCell.m
//  FreeTime
//
//  Created by 王江华 on 16/9/18.
//  Copyright © 2016年 SRDZ.com. All rights reserved.
//

#import "AliPasswordCell.h"
#import "Header.h"
@implementation AliPasswordCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

+(instancetype)cellWithTableView:(UITableView *)tableView{
    
    static  NSString *cellId=@"AliPasswordCellId";
    AliPasswordCell *cell=[tableView  dequeueReusableCellWithIdentifier:cellId];
    
    if (cell==nil) {
        cell=[[AliPasswordCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellId];
        
    }
    return cell;
}
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    
    self=[super initWithStyle:style reuseIdentifier:reuseIdentifier];
    
    self.selectionStyle=UITableViewCellSelectionStyleNone;
    
    self.accessoryType=UITableViewCellAccessoryDisclosureIndicator;
    
    if (self) {
      
        _propertyLabel=[[UILabel alloc]init];
        _propertyLabel.font=[UIFont systemFontOfSize:14];
        
     
        
        _lineView=[[UIView alloc]init];
        
        _lineView.backgroundColor=[ImageUtil colorWithRgb:0xe6e6e6];
        
        
        [self.contentView addSubview:_propertyLabel];
        
       
        
        [self.contentView addSubview:_lineView];
        
    }
    return self;
    
}
-(void)layoutSubviews{
    
    [super layoutSubviews];
    
   
    
    [_propertyLabel sizeToFit];
    
    _propertyLabel.frame=CGRectMake(10, 10, _propertyLabel.frame.size.width, 15);
    
    
    _propertyLabel.centerY=self.contentView.centerY;
    
    
    _lineView.frame=CGRectMake(0, self.contentView.frame.size.height-2, WindowWidth, 1);
    
    
    
    
    
}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
